﻿using EventBus.Abstractions;
using System;
using System.Collections.Generic;
using System.Text;

namespace EventBus
{
    /// <summary>
    /// Base event.
    /// </summary>
    public class BaseEvent
        : IEvent
    {
        public Guid Id { get; set; }
        public DateTime CreateDate { get; set; }
        public Guid AggregationRootId { get ; set; }
        public string AssemblyQualifiedAggregationRootIdType { get ; set ; }
        public string AssemblyQualifiedAggregationRootType { get ; set ; }
        public int Version { get ; set ; }
        public byte[] Data { get; set ; }

        public BaseEvent()
        {
            Id = Guid.NewGuid();
            CreateDate = DateTime.Now;
        }
    }
}
